#ifndef _framework_h__
#define _framework_h__
#include "graphics/irenderer.h"
#include "graphics/debugdraw.h"
#include "system/window.h"
#include "input/iinputmanager.h"
#include "util/frametimer.h"
#include "graphics/effect_debug.h"

namespace gecko
{

// the entry point for the game, houses systems and calls out to game-specific stuff
class Framework
{
public:
	// constructor
	Framework();

	// execute the framework loop
	void Run(int width, int height, int bpp, bool fullscreen);

protected:
	// overridden by game-code
	virtual void OnInitialise() = 0;

	// overridden by game-code
	virtual void OnUpdate(float dt) = 0;

	// overridden by game-code
	virtual void OnRender(IRenderer * renderer) = 0;

	IRenderer *		TheRenderer;
	IInputManager *	TheInputManager;

private:
	// initialise the framework
	bool Initialise(int width, int height, int bpp, bool fullscreen);

	// destory the framework
	bool Destroy();

	FrameTimer *	m_frameTimer;
	Effect_Debug *	m_debugShader;
	Window *		m_window;
};

}

#endif // _framework_h__